1. Field of the Invention
This invention relates to synchronizing and clock generating circuits, and methods for using the same.
2. Description of Related Art
In computer systems and other digital systems for displaying video signals, it is common to receive an incoming video signal and to synchronize to its timing. The incoming video signal typically includes a horizontal sync (Hsync) signal, a periodic signal having a period of one horizontal line of video, and having a clock edge in phase with a beginning point for each such horizontal line.
It is generally desirable to synchronize other higher frequency signals to the Hsync signal, such as a pixel clock (Pclock) signal. The Pclock frequency is typically 2000 times the Hsync frequency. This is often accomplished with a phase locked loop. However, use of a phase locked loop is subject to a substantial drawback. The Hsync signal may not be precise, and its frequency may vary over time, causing other higher frequency signals such as the Pclock signal to have a significant jitter, making it substantially unusable for graphics applications, for example. Because higher frequency signals are a substantial multiple of the Hsync frequency, resulting variation in those signals can be substantial and is undesirable.
Accordingly, it would be advantageous to provide a circuit for synchronizing and for generating a clock signal.
The invention provides a method and circuit for synchronizing to an incoming Hsync signal or other incoming signal, and for generating a phase locked clock signal or other high frequency signal in response thereto. A set of parallel clock signals are sampled by the Hsync signal, to produce a set of sample clock bits. The sample clock bits are logically combined with the Hsync signal and summed, to produce a summed signal which is phase locked to the Hsync signal and has the same period as the clock signals. In a preferred embodiment, the summed signal is compared with a reference, to produce a square wave output, which may be used as a Pclock or other clock signal.
In a preferred embodiment, the Hsync signal and an incoming clock are coupled to a sequence of modules. Each module comprises a latch for sampling the incoming clock on a transition of the Hsync signal, whose output is combined (using an XOR gate) with the Hsync signal. Each module comprises a time delay for generating a delayed clock signal, incrementally delayed from the previous module in the sequence, so that the clock signal for each module is phase-offset from all other modules. The latch outputs are summed using a resistor network, to produce a triangle-shaped waveform which is phase locked to the Hsync signal and which is frequency locked to the incoming clock. The triangle-shaped waveform is compared with a constant voltage to produce a square wave.